﻿using JWXH.XH.interfaces;
using Xamarin.Forms;

namespace JWXH.XH.utils
{
    public class SizeUtils
    {
        private static IScreenSize _ScreenSize;
        private static IScreenSize ScreenSize
        {
            get
            {
                if (_ScreenSize != null) return _ScreenSize;

                _ScreenSize = DependencyService.Get<IScreenSize>();
                return _ScreenSize;
            }
        }
        public static double GetRealPx(double px)
        {
            return px / 750 * ScreenSize.ScreenWidth;
        }
    }
}